Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render YML DAG config as DAG Docs #305

Merged
merged 7 commits into from
Dec 3, 2024
Merged

Render YML DAG config as DAG Docs #305

merged 7 commits into from
Dec 3, 2024

Conversation

pankajastro
Copy link
Contributor

@pankajastro pankajastro commented Dec 2, 2024

Until DAG Factory 0.20, even though the YAML is the source of truth for the DAG topology and the operators/tasks configuration, the YAML was not displayed in the Airflow UI. This can make it harder to troubleshoot and confirm that the behaviours are as expected or that the expected version was deployed.

This PR solves this limitation by adding or appending the YAML file to the DAG md_docs field. The following image illustrates this feature being used via the Airflow UI:
Screenshot 2024-12-02 at 11 06 15 PM

Closes: #272

@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.38%. Comparing base (e53b456) to head (fefafbb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #305      +/-   ##
==========================================
+ Coverage   93.22%   93.38%   +0.15%     
==========================================
  Files           8        8              
  Lines         664      680      +16     
==========================================
+ Hits          619      635      +16     
  Misses         45       45              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pankajastro pankajastro marked this pull request as ready for review December 2, 2024 18:10
@pankajastro pankajastro requested a review from a team as a code owner December 2, 2024 18:10
dagfactory/dagfactory.py Outdated Show resolved Hide resolved
dagfactory/dagfactory.py Outdated Show resolved Hide resolved
dagfactory/dagbuilder.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@tatiana tatiana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for working on this, @pankajastro , this will be very helpful for end-users. Once Airflow 3.0 is released and we know more about the new plugin strategy, we can review the approach.

@pankajastro pankajastro merged commit 9d2b8f5 into main Dec 3, 2024
67 checks passed
@pankajastro pankajastro deleted the render-yml branch December 3, 2024 13:42
@tatiana tatiana mentioned this pull request Dec 6, 2024
tatiana added a commit that referenced this pull request Dec 6, 2024
### Added

- Add support to TaskFlow and improve dynamic task mapping support by
@tatiana in #314
- Render YML DAG config as DAG Docs by @pankajastro #305
- Support building DAGs out of topologically unsorted YAML files by
@tatiana in #307
- Add support for nested task groups by @glazunov996 and @pankajastro in
#292
- Add support for templating `on_failure_callback` by @jroach-astronomer
#252

### Fixed

- Fix compatibility with
apache-airflow-providers-cncf-kubernetes>=10.0.0 by @tatiana in #311
- Refactor telemetry to collect events during DAG run and not during DAG
parsing by @pankajastro #300

### Docs

- Fix reference for HttpSensor in README.md by @pankajastro in #277
- Add example DAG for task group by @pankajastro in #293
- Add CODEOWNERS by @pankajkoti in #270
- Update CODEOWNERS to track all files by @pankajkoti in #276
- Modified Status badge in README by @jaejun #298

### Others

- Refactor dynamic task mapping implementation by @tatiana in #313
- Remove pytest durations from tests by @tatiana in #309
- Remove DAG retries check since many DAGs have different retry values
by @tatiana in #310
- Lint fixes after running `pre-commit run --all-files` by @tatiana in
#312
- Remove redundant exception code by @pankajastro #294
- Add GitHub issue template for bug reports and feature requests by
@pankajkoti in #269

Closes: #223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Render YAML definitions in Airflow UI
3 participants